Skip to content

add support for Julia#244

Closed
kongdd wants to merge 4 commits into
colbymchenry:mainfrom
kongdd:julia
Closed

add support for Julia#244
kongdd wants to merge 4 commits into
colbymchenry:mainfrom
kongdd:julia

Conversation

@kongdd
Copy link
Copy Markdown

@kongdd kongdd commented May 21, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 21, 2026 08:39
@kongdd kongdd changed the title add julia support add support for Julia May 21, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Julia language support to the extraction pipeline by registering a Julia tree-sitter grammar, adding a Julia-specific extractor, and extending the extractor API with name/body resolution hooks.

Changes:

  • Add julia to supported language lists, extension map (.jl), display names, and extractor registry.
  • Introduce getName hook and use resolveBody in the generic tree-sitter extractor to support languages whose AST doesn’t expose standard fields.
  • Add Julia extractor implementation plus Jest tests covering detection and core extraction behavior.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/types.ts Adds julia to the language union/list.
src/extraction/tree-sitter.ts Adds a getName hook path and uses resolveBody before default body lookup.
src/extraction/tree-sitter-types.ts Extends LanguageExtractor with getName hook.
src/extraction/languages/julia.ts Implements Julia-specific name/signature/body/import extraction.
src/extraction/languages/index.ts Registers juliaExtractor.
src/extraction/grammars.ts Registers Julia wasm + .jl extension + display name; loads wasm from local wasm dir.
tests/extraction.test.ts Adds Julia detection and extraction tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Language-specific name extraction hook
if (extractor.getName) {
const customName = extractor.getName(node, source);
if (customName !== null) return customName || '<anonymous>';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Julia

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need help with my star payments now if anyone can help Julia
Git config+learning status

Comment thread src/extraction/grammars.ts Outdated
@@ -126,7 +128,7 @@ export async function loadGrammarsForLanguages(languages: Language[]): Promise<v
const wasmFile = WASM_GRAMMAR_FILES[lang];
try {
// Pascal and Scala ship their own WASMs (not in tree-sitter-wasms)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RichardPresley

Comment on lines +125 to +126
* When provided, replaces the default `nameField`-based lookup in `extractName`.
* Return null to fall back to the default logic.
hexu2 pushed a commit to hexu2/codegraph that referenced this pull request May 22, 2026
Extends the approach in colbymchenry#244 (@kongdd) with fixes for common Julia 1.11
AST shapes in real-world packages:

- Add getName hook and use resolveBody for structs without block wrappers
- Extract one-line assignment functions (e.g. f(x) = expr)
- Emit module nodes; record macrocall_expression calls
- Vendor tree-sitter-julia.wasm (not shipped in tree-sitter-wasms)
- Register .jl in grammars, types, and EXTRACTORS map

Closes gaps in colbymchenry#244 where function bodies are statement lists rather than
block nodes.
hexu2 pushed a commit to hexu2/codegraph that referenced this pull request May 22, 2026
Extends the approach in colbymchenry#244 (@kongdd) with fixes for common Julia 1.11
AST shapes in real-world packages:

- Add getName hook and use resolveBody for structs without block wrappers
- Extract one-line assignment functions (e.g. f(x) = expr)
- Emit module nodes; record macrocall_expression calls
- Vendor tree-sitter-julia.wasm (not shipped in tree-sitter-wasms)
- Register .jl in grammars, types, and EXTRACTORS map

Closes gaps in colbymchenry#244 where function bodies are statement lists rather than
block nodes.
hexu2 added a commit to hexu2/codegraph that referenced this pull request May 22, 2026
Add tree-sitter-julia extraction with vendored WASM and registry wiring.
Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes:

- getName hook and resolveBody for structs/functions without block wrappers
- One-line assignment functions (e.g. f(x) = expr)
- Module nodes and macrocall_expression call sites
- Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms)
- Register .jl in grammars, types, and the language extractor map
hexu2 added a commit to hexu2/codegraph that referenced this pull request May 22, 2026
Add tree-sitter-julia extraction with vendored WASM and registry wiring.
Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes:

- getName hook and resolveBody for structs/functions without block wrappers
- One-line assignment functions (e.g. f(x) = expr)
- Module nodes and macrocall_expression call sites
- Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms)
- Register .jl in grammars, types, and the language extractor map
@kongdd kongdd requested a review from treytracedit-lab May 24, 2026 16:15
@treytracedit-lab
Copy link
Copy Markdown

I can handle it julia

@treytracedit-lab
Copy link
Copy Markdown

CI

});
}

async function stopChild(child: ChildProcessWithoutNullStreams | null): Promise<void> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve opened your file star-history-2026524.csv and here’s a clear summary of what it contains and what stands out:

📊 What the data shows

It tracks GitHub stars over time for the repository:

colbymchenry/codegraph

Each row represents a timestamp + cumulative star count

⚡ Key insights

  1. 🚀 Extremely rapid growth

Stars jump from:

1 → 100 → 4,200 → 21,280

Most of this growth happens within just a few “days” in the dataset

  1. 📈 Viral spike pattern

The steep increases suggest a viral moment:

Apr 30 → May 6 shows rapid jumps:

4,200 → 21,280 stars

That’s an increase of ~17,000 stars in a very short time window

  1. 🧠 Non-realistic timestamps

Dates show 1970 (Unix epoch era) — this is a strong sign:

The timestamps are not actual calendar dates

They were likely generated from:

relative time offsets

or a tool that defaulted to epoch-based time

📌 Interpretation

The repo experienced explosive popularity, likely due to:

Social media exposure

Hacker News / Reddit / Twitter viral share

Inclusion in popular newsletters or discussions

The data is best analyzed as relative progression, not real-world dates.

📈 Growth snapshot (simplified)

StageStarsInitial0Early traction100Viral start4,200Peak growth21,280

✅ What you can do next

If you want deeper analysis, I can:

Plot a growth curve (chart) to visualize the viral spike

Calculate growth rate per interval

Identify inflection points (when growth accelerated most)

Clean & fix the timestamps into a meaningful timeline

Just tell me 👍

@kongdd kongdd closed this May 24, 2026
hexu2 added a commit to hexu2/codegraph that referenced this pull request May 25, 2026
Add tree-sitter-julia extraction with vendored WASM and registry wiring.
Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes:

- getName hook and resolveBody for structs/functions without block wrappers
- One-line assignment functions (e.g. f(x) = expr)
- Module nodes and macrocall_expression call sites
- Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms)
- Register .jl in grammars, types, and the language extractor map
hexu2 added a commit to hexu2/codegraph that referenced this pull request May 25, 2026
…mmar

Add tree-sitter-julia extraction with vendored WASM and registry wiring.
Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes:

- getName hook for symbols whose names are not direct nameField children
- Structs without block wrappers (typed_expression children) via resolveBody
- Functions without block wrappers — handled in visitNode: first
  signature-shaped child becomes the declaration head, remaining children
  are walked via visitFunctionBody so calls are still indexed.
  resolveBody returns null for these so the core walker cannot re-enter
  extractFunction and recurse.
- One-line assignment functions (e.g. f(x) = expr)
- module_definition mapped to module kind for namespace-scoped qualified names
- macrocall_expression added to callTypes
- Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms);
  same pattern as lua/luau/pascal/scala
- Register .jl in grammars, types, and the language extractor map

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants